<template>
  <div>
  
    <el-bread></el-bread>

    <el-button type="primary" @click="add" plain size="small">添加</el-button>
 <v-list @edit='edit'></v-list>
   <v-dialog  ref='diaInfo' @cancel='cancel'  :dialogInfo='dialogInfo'></v-dialog>
  </div>
</template>

<script>
import  vList from './list'
import vDialog from './dialog'
export default {
  data() {
    return {
       dialogInfo:{
         isShow:false,  
         isAdd:true   
       }
    };
  },
  components: {
      vList,
      vDialog
      
  },
  methods: {
    add(){
      this.dialogInfo.isShow=true
      this.dialogInfo.isAdd=true
    },
    cancel(e){
      this.dialogInfo.isShow=e
    },
    edit(e){
         this.dialogInfo.isShow=true,
         this.dialogInfo.isAdd=false,
         this.$refs.diaInfo.lookup(e)
    }
  }
};
</script>

<style lang="" scoped>
.el-button {
  margin: 10px  5px;
}
</style>
